from django.contrib import admin

# Register your models here.

from .models import Store,Book,StoreBook

@admin.register(Store)
class StoreAdmin(admin.ModelAdmin):
    list_display = ('name', 'bio','owner')
    search_fields = ('name',)
    list_filter = ("owner",)
    ordering = ("id",)
    
    
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
    list_display = ('name', 'author','created_by')
    search_fields = ('name',)
    list_filter = ("created_by",)
    ordering = ("id",)
    
    
@admin.register(StoreBook)
class StoreBookAdmin(admin.ModelAdmin):
    list_display = ('store', 'book','borrowed_by')
    search_fields = ('book',)
    ordering = ("id",)

    
    